<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
  <?php if(empty($title)): ?><title>Notice - QSC</title>
  <?php else: ?>
  <title>$title</title><?php endif; ?>
  
  <meta name="description" content="Notice"/>
  <meta name="keywords" content="QSC,求是潮,Notice"/>
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common.css" media="all">
  <script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
  



<style type="text/css">
  .article{
    margin:10px 0;
  }
  a{
    cursor:pointer;
  }
</style>
<script type="text/javascript" src="__PUBLIC__/js/jquery.fancybox.pack.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/event.css"/>
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/js/fancybox/jquery.fancybox.css" media="all">
  <script type="text/javascript" src="__PUBLIC__/js/fancybox/jquery.fancybox.pack.js"></script>
  
  <script type="text/javascript" src="__PUBLIC__/js/notice.dock.js"></script>
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/srtp.css" media="all">
  <script>
	function setTab(n){
      var tli=document.getElementById("tags").getElementsByTagName("div");  
      var mli=document.getElementById("tagcontents").getElementsByTagName("div");  
      for(i=0;i<tli.length;i++){  
      tli[i].className=i==n?"taghover":"nothover";  
      mli[i].style.display=i==n?"block":"none";  
      } 
    }  
  </script>
</head>
<body>
	<div id="topbar">
		<div id="topbar_sub">
		<div id="topbar_info" class="clearfix">
			<a href = "http://www.qsc.zju.edu.cn/" target="_blank">求是潮</a>
			<p>|</p>
			<a href = "http://www.qsc.zju.edu.cn/share" target="_blank">Share学习交流平台</a>
			<a href = "http://www.qsc.zju.edu.cn/bubble" target="_blank">Bubble Music泡音乐</a>
			<a href = "__APP__">Notice</a>
		</div>
		<div id="topbar_link" class="clearfix">
			<?php if(empty($self)): ?><a href = "<?php echo U('account/login');?>" class="btn">登录</a>
			<a href = "<?php echo U('account/register');?>" class = "btn">注册</a>
			<?php else: ?>
			<a href="<?php echo U('account/');?>"     class="btn">设置</a>
			<a href="<?php echo U('account/logout');?>" class="btn">注销</a><?php endif; ?>
		</div>
		</div>
	</div>
	
    <div id = "main" class="clearfix">
    
	<div id = "nav" class="clearfix">
		<div id = "nav_menu">
			<a href = "__APP__" class = "btn" id = "nav_home"><div>首页</div></a>
			<?php if(empty($self)): ?><a href = "<?php echo U('account/login');?>" class = "btn" id = "nav_account"><div>个人主页</div></a>
			<?php else: ?>
			<a href = "<?php echo NoticeUrl::getAccount($self);?>" class = "btn" id = "nav_account"><div>个人主页</div></a><?php endif; ?>
			<a href = "<?php echo U('browse/');?>" class = "btn" id = "nav_browse"><div>活动回顾</div></a>
		</div>
		<div id = "search">
			<form  action="<?php echo U('browse/');?>" method="get">
				<input type="text" name="q" value="" id="searchtext"/>
				<input type="submit" id = "go" name="submit" value=""/>
			</form>
		</div>
	</div>
  <div id="page" class="clearfix sunye">





<div class="col-main">
  <div class="main main-wrap">
    <h1 id="title"><?php echo ($event["title"]); ?>
      <?php if(($self["uid"])  ==  $event["author_id"]): ?><a href="<?php echo U("/event/$event[id]/edit");?>" class="menu">[编辑活动]</a><?php endif; ?>
    </h1>
    <div id = "event_info" class="clearfix mod"">	
      <div class="col-main">
        <div class="main-wrap">
        <label>地点:  </label><?php echo ($event["location"]); ?>
        <br/>
        <label>开始:  </label><?php echo (substr($event["time_start"],0,-3)); ?>
        <br/>
        <label>结束:  </label><?php echo (substr($event["time_end"],0,-3)); ?>
        <br/>
        <label>类型:  </label><em><?php echo ($event["type_name"]); ?></em>
        <br/>
        <label>发起人:</label>
          <a href="<?php echo NoticeUrl::getAccount($event);?>" target="_blank"><?php echo ($event["author_name"]); ?></a>
        <br/>
	<label></label>
	<em><?php echo ($event["cnt_wish"]); ?>人关注 <?php echo ($event["cnt_take"]); ?>人参加</em>
        </div>
      </div>
      <div class="col-sub">
          <img id="event_poster" src = "<?php echo NoticeUrl::getEventPoster($event['img'], 'm');?>" >
      </div>
      <div class="col-extra">
        <!--<div><?php echo ($event["cnt_wish"]); ?>人关注 <?php echo ($event["cnt_take"]); ?>人参加</div>-->
                   
        <div id = "operation">
          <?php if(!empty($self)): ?><?php if(($event["wish"])  >  "0"): ?><span style="position:relative;top:5px;">已关注</span>
            <?php else: ?>
            <a id="canjia"  href="__SELF__/wish" class="btn">我感兴趣</a><?php endif; ?>
		<br/>
		<br/>
            <?php if(($event["take"])  >  "0"): ?><span style="position:relative;top:5px;">已参加</span>
            <?php else: ?>
            <a id="canjia"  href="__SELF__/take" class="btn" style="left:20px;">我想参加</a><?php endif; ?><?php endif; ?>
        </div>
      </div>
  <!--    <div id="tag">
        <label for="">标签: </label>
        <?php if(is_array($event["tag"])): $i = 0; $__LIST__ = $event["tag"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><a href="<?php echo U('browse/tag/'.$vo);?>"><?php echo ($vo); ?></a><?php endforeach; endif; else: echo "" ;endif; ?>
      </div>-->
    </div>
    <div id = "intro" class="mod">
        <div class = "titlebar">
            <h2 class="title">活动介绍</h2>
        </div>
        <div id = "introcon" class = "undertitle">
            <?php echo ($event["content"]); ?>
        </div>
    </div>
			
    <div id="event_image" class="mod">
        <div class = "titlebar">
            <h2 class="title">活动照片</h2>
            <a class="more" href="<?php echo U('event/'.$event[id].'/album');?>">...more</a>
        </div>
        <div class = "undertitle">
                  <?php if(empty($album)): ?><div class="img_padding">
            暂无活动照片
          </div>
        <?php else: ?>
          <ul class="clearfix">
              <?php if(is_array($album)): $i = 0; $__LIST__ = $album;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><li>
                      <a class = "img_trigger" href="<?php echo NoticeUrl::getEventImage($vo['img']);?>">
                      <img src="<?php echo NoticeUrl::getEventImage($vo['img'],'m');?>"/>
                      </a>
                      <p>来自
                        <a href = "<?php echo NoticeUrl::getAccount($vo['uid']);?>"><?php echo ($vo['uname']); ?></a>
                      </p>
                  </li><?php endforeach; endif; else: echo "" ;endif; ?>
              <script type="text/javascript">
              $(document).ready(function(){
                $('a.img_trigger').fancybox();
              });
            </script>
          </ul><?php endif; ?>

        </div>
    </div>
			
            <!--
			<div id = "bbs" class="eventsblock">
				<div class = "title">
					<p>活动讨论</p>
				</div>
				<div class = "undertitle" id= "bbscon">
					<table>
                  <?php if(($event["id"])  ==  "-100"): ?><tr>
							<td class = "td1">
							<p>忙了好久~终于可以见到亲们啦~明天晚上七点哦...</p>
							</td >
							<td class = "td2">
							<p>来自<a>总攻也能小清新</a></p>
							</td>
							<td class = "td3">
							<p>15回应</p>
							</td>
							<td class = "td4">
							<p>2011-04-15</p>
							</td>
						</tr><?php endif; ?>
					</table>
				</div>
			</div>
            -->
			
			
            <!--
			<div id = "like" class="eventsblock">
				<div class = "title">
					<p>我们也喜欢</p>
				</div>
				<div class = "undertitle">
				</div>
			</div>
            -->
			
	</div>	
			
			
</div>
		<div class = "main col-sub">
<!--
              
  <?php if(!empty($self)): ?><div id="login_mod" class="menu_mod" style="height:auto;">
    <div class="section clearfix" style="">
      <a href="<?php echo NoticeUrl::getAccount($self);?>" style="cursor:pointer;">
      <img src="<?php echo NoticeUrl::getPhoto($self['uid']);?>" class="photo"/>
      </a>
      <div style="margin-left:80px;">
        <a href="<?php echo NoticeUrl::getAccount($self);?>" style="cursor:pointer;">
          <?php echo ($self["name"]); ?>
        </a>
        <p class="signature"><?php echo ($self["signature"]); ?></p>
      </div>
    </div>
    <hr />
    <div class="section">
      <a id="create_event" href="<?php echo U('/event/create');?>">+ 发布新活动</a>
    </div>
  </div>
  
  <?php else: ?>
  <div id = "logbar">
  </div>
  <div id = "logcontent" class = "undertitle">
      <form id = "login" action="<?php echo U('/account/login');?>" method="post">
          <div class = "inputdiv">
          <label class = "label">用户名</label>
          <input name="username" type = "text" class = "input" id = "username"/><br/>
          </div>
          <div class = "inputdiv">
              <label class = "label">密码</label>
              <input name="password" type = "password" class = "input" id = "password"/>
          </div>
          <input type="submit" name="submit" id = "denglu" value=""/>
          
      </form>
	  <form>
	  	  <a href="<?php echo U('account/register');?>">
		<input type="submit" id="zhuce" value=""/>
		</a>
	  </form>

      
  </div><?php endif; ?>-->
        <div id = "event_taker">
            <div class = "title">
              活动参与者
            </div>
            <div id = "zhubancontent" class = "undertitle">
              <?php $users=$takers ?>
                 <ul class="clearfix users_lite">
    <?php if(is_array($users)): $i = 0; $__LIST__ = $users;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><li>
        <a href="<?php echo NoticeUrl::getAccount($vo);?>">
          <img src = "<?php echo NoticeUrl::getPhoto($vo['uid']);?>" >
        </a>
	<div><?php echo ($vo["name"]); ?> </div>
      </li><?php endforeach; endif; else: echo "" ;endif; ?>
    </ul>
            </div>
        </div>
        <div id = "event_hot">
          <div class = "title" id="sunyx">
            其他热门活动
          </div>
          <div id = "zhubanfangcontent" class = "undertitle">
          <?php $events=$hot ?>
        <ul class = "section clearfix">
  <?php if(empty($events)): ?><li>Notice目前找不到符合条件的活动. </li>
  <?php else: ?>
  <?php if(is_array($events)): $i = 0; $__LIST__ = $events;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><li class = "item clearfix">
      <div class="event_img">
        <a href="<?php echo U("event/$vo[id]");?>">
          <img src = "<?php echo NoticeUrl::getEventPoster($vo['img'],'m');?>" width="90" height="90" />
        </a>
      </div>
      <div class="event_info">
        <h3><a href="<?php echo U("event/$vo[id]");?>"><?php echo ($vo["title"]); ?></a></h3>
        <?php echo (substr($vo["time_start"],0,-3)); ?><br/>
        <?php echo ($vo["location"]); ?><br/>
      </div>
    </li><?php endforeach; endif; else: echo "" ;endif; ?><?php endif; ?>
</ul>



          </div>
        </div>
		</div>



 
    </div>
    <div id = "footer">
    </div>
  </div>
  <div id="dock">
  <div class="main-wrap">
    <?php if(empty($self)): ?><a id="dock_login" href = "<?php echo U('/account/login');?>" class = "navtopy">登录</a>
    | <a id="dock_alert" href="<?php echo U('/alert/');?>" class="navtopy">系统消息</a>
    | <a id="dock_register" href = "<?php echo U('/account/register');?>" class = "navtopy">注册</a>
    <?php else: ?>
    <a id="dock_account" href="<?php echo NoticeUrl::getAccount($self);?>"><?php echo ($self["name"]); ?></a>
    | <a id="dock_setting" href="<?php echo U('Home-account/');?>" class="navtopy">设置</a>
    <!--| <a id="dock_pm" href="<?php echo U('Home-pm/');?>" class="navtopy">短信</a>  TODO-->
    | <a id="dock_alert" href="<?php echo U('/alert/');?>" class="navtopy">系统消息</a>
    | <a id="dock_logout" href="<?php echo U('/account/logout');?>" class="navtopy">注销</a><?php endif; ?>
  </div>
  <script type="text/javascript">
    $(document).ready(function(){
      NoticeDock.get({
        uid:  "<?php echo ($self["uid"]); ?>",
        username: "<?php echo ($self["name"]); ?>"
      });
    });
  </script>
</div>
</body>
</html>